    </div> <!-- closes .page-container -->
    <footer>
        <p>&copy; <script>document.write(new Date().getFullYear())</script> Selkies.</p>
    </footer>

    <script>
        const reloadButton = document.getElementById('reload-page-button');
        if (reloadButton) {
            reloadButton.addEventListener('click', function() {
                window.location.reload();
            });
        }

        function processDirectoryListing() {
            const webPathPrefix = '/files/';
            const diskPathPrefix = 'REPLACE_DOWNLOADS_PATH';
            const h1 = document.querySelector('h1');

            if (h1) {
                const originalText = h1.textContent;
                const newText = originalText.replace(webPathPrefix, diskPathPrefix);
                h1.textContent = newText;
            }

            const isAtRoot = window.location.pathname === webPathPrefix;
            if (isAtRoot) {
                const parentLink = document.querySelector('table#list td.link a[href="../"]');
                if (parentLink && parentLink.textContent.trim() === "Parent directory/") {
                    const parentRow = parentLink.closest('tr');
                    if (parentRow) {
                        parentRow.style.display = 'none';
                    }
                }
            }
        }

        let attempts = 0;
        const maxAttempts = 20;
        const intervalId = setInterval(function() {
            attempts++;
            const h1 = document.querySelector('h1');
            const table = document.getElementById('list');

            if (h1 && table) {
                clearInterval(intervalId);
                processDirectoryListing();
            } else if (attempts >= maxAttempts) {
                clearInterval(intervalId);
                processDirectoryListing();
            }
        }, 100);

    </script>
</body>
</html>
